package com.yfp.client.service.impl;

import cn.hutool.core.util.NumberUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yfp.client.domain.PositionSharing;
import com.yfp.client.service.PositionSharingService;
import com.yfp.client.mapper.PositionSharingMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 *
 * @description 针对表【position_sharing(点位分成表)】的数据库操作Service实现
 * @createDate 2024-07-25 10:47:45
 */
@Service
public class PositionSharingServiceImpl extends ServiceImpl<PositionSharingMapper, PositionSharing> implements PositionSharingService {

    @Resource
    private PositionSharingMapper positionSharingMapper;

    @Override
    public Boolean isExistSharing(String orderId) {
        Long count = positionSharingMapper.isExistSharing(orderId);
        return NumberUtil.isGreater(NumberUtil.toBigDecimal(count), BigDecimal.ZERO);
    }
}




